printing: Show all Avahi advertised printers
authorMarek Kasik <mkasik@redhat.com>
Fri, 5 Feb 2021 17:13:56 +0000 (18:13 +0100)
committerMarek Kasik <mkasik@redhat.com>
Fri, 5 Feb 2021 17:35:56 +0000 (18:35 +0100)
commita93ab37ea9f3c2783b8a04895a7f5bd3dbea96ca
treee28cbf2e52346660d29b907ad1a2a927b94de63f
parent5d7364960a60d25f4a1c3bdf32ea1d5869e0b2f8
printing: Show all Avahi advertised printers

This commit unsubscribes CUPS backend from a DBus
signal in idle when listening for new items on Avahi.

Since GDBus emits gathered signals in idle while
checking whether the signal has been unsubscribed
it could happen that a signal was not processed
because it was removed from hash table of
subscribed signals.
This caused the situation where printers advertised
on Avahi were not listed in CUPS backend sometimes.

We need those signals since this happens when switching
from a general subscription which listens to signals
for all Avahi services to a specific one which listens
to just _ipp._tcp and _ipps._tcp (chicken and egg problem).
modules/printbackends/gtkprintbackendcups.c